import request from '@/utils/request'

// 查询薪资发放管理列表
export function listSalarypayments(query) {
  return request({
    url: '/ldcm/salarypayments/list',
    method: 'get',
    params: query
  })
}

// 查询薪资发放管理详细
export function getSalarypayments(paymentId) {
  return request({
    url: '/ldcm/salarypayments/' + paymentId,
    method: 'get'
  })
}

// 新增薪资发放管理
export function addSalarypayments(data) {
  return request({
    url: '/ldcm/salarypayments',
    method: 'post',
    data: data
  })
}

// 修改薪资发放管理
export function updateSalarypayments(data) {
  return request({
    url: '/ldcm/salarypayments',
    method: 'put',
    data: data
  })
}

// 删除薪资发放管理
export function delSalarypayments(paymentId) {
  return request({
    url: '/ldcm/salarypayments/' + paymentId,
    method: 'delete'
  })
}

//工资发放申请
export function submitSalary(paymentId) {
  return request({
    url: '/ldcm/salarypayments/submitSalary/' + paymentId,
    method: 'get'
  })
}

//未完成审批的列表

export function listSalarypaymentsNo(query) {
  return request({
    url: '/ldcm/salarypayments/listNo',
    method: 'get',
    params: query
  })
}

// 查询审批薪资发放管理详细
export function getSalaryComment(paymentId) {
  return request({
    url: '/ldcm/salarypayments/getSalaryComment/' + paymentId,
    method: 'get'
  })
}

//审批学生信息
export function approveSalary(data){
  return request({
    url: '/ldcm/salarypayments/editnoapprove',
    method: 'post',
    data: data
  })
}

//完成审批的列表

export function listSalaryFinished(query) {
  return request({
    url: '/ldcm/salarypayments/listFinished',
    method: 'get',
    params: query
  })
}